#ifndef GAMECOIN_H
#define GAMECOIN_H

#include <QPushButton>
#include <QTimer>

class GameCoin : public QPushButton
{
public:
    GameCoin(QString img,QWidget* parent = nullptr);
    int posX() const;
    void setPosX(int newPosx);
    int posY() const;
    void setPosY(int newPosY);
    bool flag() const;
    void setFlag(bool newFlag);
    void changeFlag();
    void setIsWin(bool newIsWin);

private:
    int m_posX;
    int m_posY;
    bool m_flag;
    int m_minIndex;
    int m_maxIndex;
    bool m_isWin;
    bool m_isAnimation;
    //两个定时器
    QTimer *m_timerToFront;
    QTimer *m_timerToBack;
};

#endif // GAMECOIN_H
